<template>
  <div class="app-container">
    <img src="@/page/main/assets/mark64.png" alt="" style="float:left;margin-right:30px;">
      <div>
        <p>你点击了关闭按钮，你是想：</p>
         <el-radio-group v-model="closeWinSelect">
          <el-radio :label="0" style="margin-bottom:10px">最小化到托盘，不退出程序</el-radio><br>
          <el-radio :label="1">关闭</el-radio>
        </el-radio-group>
        <!-- <el-radio v-model="closeWinSelect" label="0">备选项</el-radio><br>
        <el-radio v-model="closeWinSelect" label="1">备选项</el-radio> -->
      </div>
      <el-checkbox v-model="closeWinSelectChecked" style="margin-top:15px;">不再提示</el-checkbox>
      <div style="margin-top:20px;float:right">
        <el-button size="small" @click="onCancel">取 消</el-button>
        <el-button size="small" type="primary" @click="confirmCloseWinDialog">确 定</el-button>
      </div>
  </div>
</template>

<script>
import { ipcRenderer } from 'electron'
export default {
  data() {
    return {
      closeWinSelect: 0
    }
  },
  methods: {
    confirmCloseWinDialog() {
      if (this.closeWinSelect === 0) {
        ipcRenderer.send('minimizeCloseWin')
      } else {
        ipcRenderer.send('closeMainWin')
      }
    },
    onCancel() {
      ipcRenderer.send('closeCloseWin')
    }
  }
}
</script>

<style scoped>
.line{
  text-align: center;
}
</style>

